-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
T6589: Return a dict when querying information about a single interface #3840
Conversation
👍 |
👍 |
As we return a list of dicts for multiple interfaces, shouldn't we also return an empty list for no interface and also a list for even only one interface? |
I think it depends on what we are doing, searching for an object or getting information about a specific object. When we try to get information about a single object return dict looks ok, but when we try to find an object then a better return list with elements even only one or an empty list. |
3ae1177
to
bb4785d
Compare
…terfaces that don't exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c-po I'm not sure if I understand the point abaout "no interface". When the user queries data about a single named interface and that interface is not found, we raise an exception — trying to retrieve data that doesn't exist should not return an empty list for sure, it should result in an error.
for more convenience now i use a similar format for return list when we get info for many interfaces |
CI integration ❌ failed! Details
|
Change Summary
Types of changes
Related Task(s)
Related PR(s)
Component(s) name
Proposed changes
How to test
Smoketest result
Checklist: